
<?php
	require_once("connect_sql.php");
	
	$sql = "select * from camera order by size,name";
	$result = mysql_query($sql);
	if(!$result) echo mysql_error();
	$size = "";
	while($row = mysql_fetch_array($result)) {
		if($size != $row['size']) {
			if($size != "") {
			}
			$size = $row['size'];
			printf('<div class="lcdCap"><span>%s</span></div>', $size);
		}
		printf("<div class=\"checkboxItem\"><input type=\"checkbox\" name=\"camera\" value=\"%d\"/><label>%s</label></div>", $row['id'], $row['name']);
	}
	//<div class="checkboxItem"><input type="checkbox" name="camera" value="1"/><label>GC6133</label></div>
?>